<%@page import="Model.Purchase.PurchaseOfferList"%>
<%@page import="Model.Purchase.PurchaseMaterielOfferList"%>
<%@page import="Model.Purchase.PurchaseMaterielList"%>
<%@page import="Model.Purchase.PurchaseList"%>
<%@page import="RssEasy.Core.HttpRequestHelper"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    HttpRequestHelper hrh = new HttpRequestHelper(pageContext).request();
    PurchaseList pl = new PurchaseList(pageContext);
    PurchaseOfferList pol = new PurchaseOfferList(pageContext);
    PurchaseMaterielOfferList pmol = new PurchaseMaterielOfferList(pageContext);
    pl.keyvalue("state", "2").keyvalue("totalcost",hrh.get("totalcost"));
    pl.update().where("id=?", hrh.get("purchaseid")).submit();
    pmol.keyvalue("judge", "1");
    pmol.update().where("myid=? and materielid=?", hrh.get("choosedcop"), hrh.get("materielid")).submit();
    pol.keyvalue("result", "1");
    pol.update().where("myid=? and purchaseid=?", hrh.get("choosedcop"), hrh.get("purchaseid")).submit();
    out.print("1");
%>

